package Server.ServerCore.Model.dbsql.model;

import java.io.Serializable;

public class GameRole implements Serializable {
    private Integer rid;

    private String roleName;

    private Double roleIntegration;

    private Double roleBargainingChip;

    private String roleAccount;

    private String rolePassword;

    private static final long serialVersionUID = 1L;

    public Integer getRid() {
        return rid;
    }

    public void setRid(Integer rid) {
        this.rid = rid;
    }

    public String getRoleName() {
        return roleName;
    }

    public void setRoleName(String roleName) {
        this.roleName = roleName == null ? null : roleName.trim();
    }

    public Double getRoleIntegration() {
        return roleIntegration;
    }

    public void setRoleIntegration(Double roleIntegration) {
        this.roleIntegration = roleIntegration;
    }

    public Double getRoleBargainingChip() {
        return roleBargainingChip;
    }

    public void setRoleBargainingChip(Double roleBargainingChip) {
        this.roleBargainingChip = roleBargainingChip;
    }

    public String getRoleAccount() {
        return roleAccount;
    }

    public void setRoleAccount(String roleAccount) {
        this.roleAccount = roleAccount == null ? null : roleAccount.trim();
    }

    public String getRolePassword() {
        return rolePassword;
    }

    public void setRolePassword(String rolePassword) {
        this.rolePassword = rolePassword == null ? null : rolePassword.trim();
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        GameRole other = (GameRole) that;
        return (this.getRid() == null ? other.getRid() == null : this.getRid().equals(other.getRid()))
            && (this.getRoleName() == null ? other.getRoleName() == null : this.getRoleName().equals(other.getRoleName()))
            && (this.getRoleIntegration() == null ? other.getRoleIntegration() == null : this.getRoleIntegration().equals(other.getRoleIntegration()))
            && (this.getRoleBargainingChip() == null ? other.getRoleBargainingChip() == null : this.getRoleBargainingChip().equals(other.getRoleBargainingChip()))
            && (this.getRoleAccount() == null ? other.getRoleAccount() == null : this.getRoleAccount().equals(other.getRoleAccount()))
            && (this.getRolePassword() == null ? other.getRolePassword() == null : this.getRolePassword().equals(other.getRolePassword()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getRid() == null) ? 0 : getRid().hashCode());
        result = prime * result + ((getRoleName() == null) ? 0 : getRoleName().hashCode());
        result = prime * result + ((getRoleIntegration() == null) ? 0 : getRoleIntegration().hashCode());
        result = prime * result + ((getRoleBargainingChip() == null) ? 0 : getRoleBargainingChip().hashCode());
        result = prime * result + ((getRoleAccount() == null) ? 0 : getRoleAccount().hashCode());
        result = prime * result + ((getRolePassword() == null) ? 0 : getRolePassword().hashCode());
        return result;
    }
}